package com.tiancheng.trade.merchant.feign.hystrix;

import com.tiancheng.trade.commom.core.data.Result;
import com.tiancheng.trade.merchant.exception.BusinessException;
import com.tiancheng.trade.merchant.feign.ISettlementRuleFeignService;
import com.tiancheng.trade.merchant.vo.product.OpenDeleteProductVO;
import com.tiancheng.trade.merchant.vo.product.SettlementRuleVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Slf4j
public class SettlementRuleFeignService implements ISettlementRuleFeignService {


    @Override
    public Result<List<SettlementRuleVO>> findSettlementRuleList(String productCode,String settlementStatus) throws BusinessException {
        log.info(productCode);
        log.error("findSettlementRuleList 服务出错了");

        Result<List<SettlementRuleVO>> result = new Result<>();
        result.setRet(1);
        result.setData(null);
        return result;
    }

    @Override
    public Result<?> updateMerchantName(SettlementRuleVO settlementRuleVO) throws BusinessException {
        return null;
    }

    @Override
    public Result<?> openDeleteRule(OpenDeleteProductVO productVO) throws BusinessException {
        return Result.fail("系统繁忙，请稍后重试！");
    }
}
